<%--
    Document   : newarea
    Created on : Oct 16, 2011, 10:43:32 PM
    Author     : VIC
--%>
<%--
    Tham số hệ thống
newarea  areainfo   areaname   areamsg  save
order    status     action  search
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@page import="java.util.*,Beans.ThamSoHT, Beans.NhanVien,Models.ThamSoHT_Model,Models.Ban_Model, Models.DatBan_Model, Models.NhanVien_Model"%>
<!--
Danh sách các tham số hệ thống ở trang này :
order      areainfo     areamsg     status      arealang
newarea    areaname     save        action      arealist
enable     disable      search
-->
<%
            NhanVien nv = new NhanVien();
            if (session.getAttribute("nv") == null) {
                response.sendRedirect("index.jsp");
                return;
            } else {
                nv = (NhanVien) session.getAttribute("nv");
                if (nv == null || nv.getMaNNV() != 3) {
                    response.sendRedirect("index.jsp");
                    return;
                }
            }
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>i-Order</title>
        <link rel="icon" href="images/icon.png" />
        <link rel="shortcut icon" href="images/icon.png" />
        <link rel="apple-touch-icon" href="images/icon.png"/>
        <link rel="apple-touch-icon-precomposed" href="images/icon.png"/>
        <link href="css/style.css" type="text/css" rel="stylesheet" />
        <link href="css/ui-darkness/jquery-ui-1.8.16.custom.css" type="text/css" rel="stylesheet" />
        <link href="css/jquery.alerts.css" type="text/css" rel="stylesheet" />
        <script src="js/jquery-1.5.1.min.js" type="text/javascript"></script>
        <script src="js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
        <script src="js/jquery.ui.datepicker-vi.js" type="text/javascript"></script>
        <script src="js/jquery.ui.datepicker-fr.js" type="text/javascript"></script>
        <script src="js/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
        <script src="js/jquery.alerts.js" type="text/javascript"></script>
        <script src="js/msg.js" type="text/javascript"></script>
        <script src="js/ajax.js" type="text/javascript"></script>
        <title>JSP Page</title>
        <script type="text/javascript">
            $().ready(function() {
                $(".toggle").click(function(){
                    $(".content").slideToggle("medium");
                });
                $('dt a').click(function(){
                    $('dt.current').removeClass('current');
                    $(this).parent().addClass('current');
                });
            });
        </script>
        <script type="text/javascript">
            var Notifi;
            var idd;
            jQuery(document).ready(function() {
                clearInterval(idd);
                idd = null;
                if(Notifi == null){
                    Notifi = setInterval( "Notification1()", 3000 );
                }
            });
        </script>
        <script type="text/javascript">
            function keypress(e){
                //Hàm dùng để ngăn người dùng nhập các ký tự khác ký tự số vào TextBox
                var keypressed = null;
                if (window.event)
                {
                    keypressed = window.event.keyCode; //IE
                }
                else
                {
                    keypressed = e.which; //NON-IE, Standard
                }
                if (keypressed < 48 || keypressed > 57 )
                { //CharCode của 0 là 48 (Theo bảng mã ASCII)
                    //CharCode của 9 là 57 (Theo bảng mã ASCII)
                    if (keypressed == 8 || keypressed == 127  )
                    {//Phím Delete và Phím Back
                        return;
                    }
                    return false;
                }
            }
        </script>
        <%
                    int langid = (Integer) session.getAttribute("langid"); // ngôn ngữ hiện tại
                    String dsts = " 'msgpass', 'msgdetailuser', 'signout', 'address', 'orderbill', 'account', 'nameofuser', 'hello', 'newpass', 'checkreserv', 'datemsg', 'delete', 'nameofcustomer', 'reservlist', 'searchseat', 'numberofcustomer', 'hours', 'rightmsg', 'save', 'timehistory',  'reservinfo', 'customer', 'areaname', 'checksubmitmsg', 'phonenumber', 'from', 'reservation', 'notice', 'tablename', 'to' ";
                    ThamSoHT[] mdsts = ThamSoHT_Model.DSThamSo(dsts, langid); // mảng chứa các tham số của trang này.
                    String account = mdsts[0].getTenTS();
                    String address = mdsts[1].getTenTS();
                    String areaname = mdsts[2].getTenTS();
                    String checkreserv = mdsts[3].getTenTS();
                    String checksubmitmsg = mdsts[4].getTenTS();
                    String customer = mdsts[5].getTenTS();
                    String datemsg = mdsts[6].getTenTS();
                    String delete = mdsts[7].getTenTS();
                    String from = mdsts[8].getTenTS();
                    String hello = mdsts[9].getTenTS();
                    String hours = mdsts[10].getTenTS();
                    String msgdetailuser = mdsts[11].getTenTS();
                    String msgpass = mdsts[12].getTenTS();
                    String nameofcustomer = mdsts[13].getTenTS();
                    String nameofuser = mdsts[14].getTenTS();
                    String newpass = mdsts[15].getTenTS();
                    String notice = mdsts[16].getTenTS();
                    String numberofcustomer = mdsts[17].getTenTS();
                    String orderbill = mdsts[18].getTenTS();
                    String phonenumber = mdsts[19].getTenTS();
                    String reservation = mdsts[20].getTenTS();
                    String reservinfo = mdsts[21].getTenTS();
                    String reservlist = mdsts[22].getTenTS();
                    String rightmsg = mdsts[23].getTenTS();
                    String save = mdsts[24].getTenTS();
                    String searchseat = mdsts[25].getTenTS();
                    String signout = mdsts[26].getTenTS();
                    String tablename = mdsts[27].getTenTS();
                    String timehistory = mdsts[28].getTenTS();
                    String to = mdsts[29].getTenTS();

                    String msgcheckreserv = notice + "/" + checkreserv;
                    String msgright = notice + "/" + rightmsg;
                    String msgdate = notice + "/" + datemsg;
                    String msgchecksubmit = notice + "/" + checksubmitmsg;
                    String detailusermsg = notice + "/" + msgdetailuser;
                    String passmsg = notice + "/" + msgpass;

                    Vector vBan = (Vector) request.getAttribute("DSBan");
                    Vector vKV = (Vector) request.getAttribute("DSKV");
                    Vector vDSDB = (Vector) request.getAttribute("DSDB");
                    String makv = (String) request.getAttribute("makv");
                    int numpage1 = 0;// khởi tạo số trang = 0
                    int vsize1 = vBan.size();
                    if (vsize1 % 30 == 0) // mỗi trang có 6 dòng
                    {
                        numpage1 = vsize1 / 30;
                    } else {
                        numpage1 = vsize1 / 30 + 1;
                    }
                    int numpage = 0;// khởi tạo số trang = 0
                    int vsize = vDSDB.size();
                    if (vsize % 4 == 0) // mỗi trang có 6 dòng
                    {
                        numpage = vsize / 4;
                    } else {
                        numpage = vsize / 4 + 1;
                    }
                    String xx1 = (String) request.getAttribute("itemban");
                    int item1 = Integer.parseInt(xx1);
                    String xx = (String) request.getAttribute("itemdb");
                    int item = Integer.parseInt(xx);
                    int total = 0;
        %>
        <script type="text/javascript">
            $(function(){
                $('#datepicker1').datepicker($.datepicker.regional['vi']);
                $( "#datepicker1" ).datepicker( "option", "dateFormat","dd/mm/yy");
                $('#datepicker2').datepicker($.datepicker.regional['vi']);
                $( "#datepicker2" ).datepicker( "option", "dateFormat","dd/mm/yy");
                $('#datepicker3').datepicker($.datepicker.regional['vi']);
                $( "#datepicker3" ).datepicker( "option", "dateFormat","dd/mm/yy");
            });
        </script>
    </head>
    <body>
        <div id="head">
            <div class="left">
                <a class="button profile" href="">
                    <img style=" margin-top: 4px;" alt="" src="images/huser.png">
                </a>
                <%=hello%>
                <a href="#"><%=nv.getHoTen()%></a>
            </div>
            <div class="userNav">
                <ul>
                    <li>
                        <a href="#" onclick="ShowChangePass()">
                            <img alt="" src="images/settings.png"><span><%=account%></span>
                        </a>
                        <div id="changepass" style="width: 355px; margin-top: 41px; margin-left: -130px !important; background: url('images/topNav.jpg') repeat; ">
                            <form action="" id="changepasss">
                                <div style=" margin: 10px 10px 8px;">
                                    <div style=" width: 120px; float: left; font-size: 13px; padding-left: 5px;"><%=nameofuser%></div>
                                    <input style=" width: 200px; margin-top: 8px;" type="text" class="text tennv" name="tennv" value="<%=NhanVien_Model.LayTenNV(nv.getMaNV())%>" >
                                </div>
                                <div style=" margin: 10px 10px 8px; clear: both;">
                                    <div style=" width: 120px; float: left; font-size: 13px;padding-left: 5px;"><%=newpass%></div>
                                    <input style=" width: 200px; margin-top: 8px;" type="text" class="text newpass" name="newpass" >
                                </div>
                                <div style=" margin: 10px 10px 8px; clear: both;">
                                    <div style=" width: 120px; float: left; font-size: 13px;padding-left: 5px;"><%=address%></div>
                                    <input style=" width: 200px; margin-top: 8px;" type="text" class="text diachi" name="diachi" value="<%=NhanVien_Model.LayDiaChi(nv.getMaNV())%>">
                                </div>
                                <div style=" margin: 10px 10px 8px; clear: both;">
                                    <div style=" width: 120px; float: left; font-size: 13px;padding-left: 5px;"><%=phonenumber%></div>
                                    <input style=" width: 200px; margin-top: 8px;" type="text" class="text sodt" name="sodt" onkeypress="return keypress(event)" value="<%=NhanVien_Model.LaySoDT(nv.getMaNV())%> " >
                                </div>
                                <input style=" margin-left: 135px; margin-bottom: 10px; margin-top: 10px;" class="button" type="button"  value="<%=save%>" lang="<%=passmsg%>" alt="<%=msgchecksubmit%>" id="<%=detailusermsg%>" onclick="Changepass1(this.lang, this.alt, this.id)">
                            </form>
                        </div>
                    </li>
                    <li>
                        <a href="DangNhap_Controller?action=logout">
                            <img alt="" src="images/lgout.png"><span><%=signout%></span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <div id="sidebar">
            <dl>
                <div id="notification">
                    <img alt="" src="images/notification.png">
                </div>
                <dt class="reservation current"><a href="DatBan_Controller?action=Show&item=1" class="1" name="<%=msgright%>"><span><%=reservation%></span></a></dt>
                <dt class="orderbill"><a href="PhieuDatMA_Controller?action=Show&item=1" class="1" name="<%=msgright%>" onclick="Orderbill( this.className, this.name);"><span><%=orderbill%></span></a></dt>
            </dl>
        </div>
        <div id="content" class="white">
            <h1><img style=" margin-top: 5px; margin-right: 13px; opacity: 0.8;" alt="" src="images/reservation.png"><%=reservation%></h1>
            <div class="cb"></div>
            <div id="createDB" class="bloc left" style="margin-top: 10px; width: 56%;">
                <div class="title">
                    <%=reservinfo%>
                </div>
                <div class="content">
                    <form name="addReserv" action="">
                        <div style=" width: 300px; float: left; margin-left: 10px;">
                            <div style=" width: 100px;  float: left;"><%=areaname%></div>
                            <select name="makv" style=" width: 150px; margin-bottom: 10px;" class="1" lang="<%=msgright%>" onchange="ShowMapReserv(this.value, this.className, this.lang)">
                                <%
                                            for (int k = 0; k < vKV.size(); k++) {
                                                Beans.KhuVuc kvv = (Beans.KhuVuc) vKV.elementAt(k);
                                %>
                                <option value="<%=kvv.getMaKV()%>"><%=kvv.getTenKV()%></option>
                                <%  }
                                %>
                            </select>
                        </div>
                        <div style=" width: 150px; float: left; "><%=tablename%></div>
                        <input type="textbox" class="text" name="tenban" style=" width: 40px; margin-bottom: 10px;" onkeypress="return keypress(event)"><br />
                        <div style=" width: 300px; float: left; margin-left: 10px;">
                            <div style=" width: 100px; float: left;"><%=nameofcustomer%></div>
                            <input type="textbox" name="tenkh" class="text" style="width: 150px;">
                        </div>
                        <div style=" width: 150px; float: left;"><%=numberofcustomer%></div>
                        <input type="textbox" class="text" name="sokhach" style=" width: 40px; margin-bottom: 10px;" onkeypress="return keypress(event)"><br />
                        <div style=" width: 300px; float: left; margin-left: 10px;">
                            <div style=" width: 100px;  float: left;"><%=timehistory%></div>
                            <input type="textbox" class="text" name="ngay" id="datepicker1" style="width: 85px; margin-right: 3px;">
                            <input type="textbox" class="text" maxlength="2" name="gio" value="0" style="width: 30px; margin-right: 3px;" onkeypress="return keypress(event)"><%=hours%>
                        </div>
                        <div style=" width: 100px; float: left;"><%=phonenumber%></div>
                        <input type="textbox" class="text" name="sodt" style=" width: 90px; margin-bottom: 10px;" onkeypress="return keypress(event)"><br />
                        <input style="margin-left: 235px; margin-top: 3px; margin-bottom: 3px;" class="button" lang="<%=msgright%>" alt="<%=msgchecksubmit%>" onclick="CreateReserv(this.lang, this.alt, this.id);" id="<%=msgcheckreserv%>" type="button" value="<%=save%>" />
                    </form>
                </div>
            </div>
            <div id="Map" class="right" style=" margin-top: -10px; background: none; width: 43%;">
                <%
                if (vBan.size() > 0) {%>
                <div class="bloc">
                    <div class="seat">
                        <form action="" name="seat">
                            <input type="textbox" name="searchseat" class="searchseat" id="1" lang="<%=msgright%>" onclick="ClickSearchSeat()" onkeyup="SearchSeat(this.value, this.alt, this.id, this.lang)" value="<%=searchseat%>" alt="<%=makv%>" onkeypress="return keypress(event)"><br/>
                            <%
                                                for (int i = (item1 - 1) * 30; i < (item1 - 1) * 30 + 30 && i < vsize1; i++) {
                                                    Beans.Ban b = (Beans.Ban) vBan.elementAt(i);
                            %>
                            <%
                                            if (b.getMaTTBan() == 1) {%>
                            <a href="#" class="available" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>"  ><center><%=b.getTenBan()%></center></a>
                            <%  } else if (b.getMaTTBan() == 2) {%>
                            <a href="#" class="notbill" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>" ><center><%=b.getTenBan()%></center></a>
                            <%  } else if (b.getMaTTBan() == 3) {%>
                            <a href="#" class="inbill" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>"><center><%=b.getTenBan()%></center></a>
                            <%  } else if (b.getMaTTBan() == 4) {%>
                            <a href="#" class="num paid" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>" ><center><%=b.getTenBan()%></center></a>
                            <%  } else if (b.getMaTTBan() == 5) {%>
                            <a href="#" class="num cleanup" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>" ><center><%=b.getTenBan()%></center></a>
                            <%  } else if (b.getMaTTBan() == 6) {%>
                            <a href="#" class="num join" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>" ><center><%=b.getTenBan()%></center></a>
                            <%  } else if (b.getMaTTBan() == 7) {%>
                            <a href="#" class="num booked" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>" ><center><%=b.getTenBan()%></center></a>
                            <%  } else {%>
                            <a href="#" class="num check" onclick="ShowDatBan(this.name, this.id)" id="<%=b.getTenBan()%>" title="<%=Ban_Model.LayTinhTrang(b.getMaBan(), langid)%>" name="<%=b.getMaBan()%>"><center><%=b.getTenBan()%></center></a>
                            <%  }%>
                            <%  }%>
                        </form>
                        <div class="pagination" style=" margin-bottom: 0; margin-top: 0;">
                            <%
                                                int trang1 = 1;
                                                if (item1 > 1) {
                                                    trang1 = item1 - 1;
                                                }
                            %>
                            <%
                                    if (vsize1 > 30) {%>
                            <a href="#" class="prev" name="<%=makv%>"  title="<%= trang1%>" lang="<%=msgright%>" onclick="ShowMapReserv(this.name, this.title, this.lang)">«</a>
                            <%
                                                                for (int c = 1; c <= numpage1; c++) {

                                                                    if (c != item1) {
                            %> <a href="#" name="<%= makv%>" title="<%= c%>" lang="<%=msgright%>" onclick="ShowMapReserv(this.name, this.title, this.lang)" ><%= c%></a>
                            <% } else {%><a class="current"> <%= c%></a> <% }

                                                                }
                            %>
                            <%
                                                                if (item1 + 1 <= numpage1) {
                                                                    trang1 = item1 + 1;
                                                                } else {
                                                                    trang1 = item1;
                                                                }
                            %>
                            <a href="#" class="next" name="<%= makv%>" title="<%= trang1%>" lang="<%=msgright%>" onclick="ShowMapReserv(this.name, this.title, this.lang)">»</a>

                            <%  }%>
                        </div>
                    </div>
                </div>
                <%  }
                %>
            </div>
            <div class="cb"></div>
            <div id="DSDB" style="margin-top: 15px;" class="bloc" >
                <div class="title">
                    <%=reservlist%>
                </div>
                <div class="content">
                    <form name="dsdb" action="">
                        <table>
                            <thead>
                                <tr>
                                    <th style="width: 7%;" class="STT">
                                        <input type="checkbox" onclick="CheckAllDB()">
                                    </th>
                                    <th style="width: 21%;">
                                        <a href="#" id="titledskv1" style="margin-top: 5px;" class="down" lang="<%=msgright%>"  name="1" onclick="SortNgayGioDB(this.className, this.name, this.lang)">
                                            <div style="float:left"><%=timehistory%></div>
                                            <div style=" margin-right: 75px;" id="sortkv1" class="down1"></div>
                                        </a>
                                    </th>
                                    <th style="width: 14%;">
                                        <a href="#" id="titledskv2" style="margin-top: 5px;" class="down" lang="<%=msgright%>" name="1" onclick="SortKVDB( this.className, this.name, this.lang)">
                                            <div style="float:left"><%=areaname%></div>
                                            <div style=" margin-right: 25px;" id="sortkv2" class="down1"></div>
                                        </a>
                                    </th>
                                    <th style="width: 11%;">
                                        <a href="#" id="titledskv3" style="margin-top: 5px;" class="down" lang="<%=msgright%>"  name="1" onclick="SortTenBanDB( this.className, this.name, this.lang)">
                                            <div style="float:left"><%=tablename%></div>
                                            <div style=" margin-right: 10px;" id="sortkv3" class="down1"></div>
                                        </a>
                                    </th>
                                    <th style="width: 15%;">
                                        <a href="#" id="titledskv4" style="margin-top: 5px;" class="down" lang="<%=msgright%>"  name="1" onclick="SortKHDB( this.className, this.name, this.lang)">
                                            <div style="float:left"><%=customer%></div>
                                            <div style=" margin-right: 30px;" id="sortkv4" class="down1"></div>
                                        </a>
                                    </th>
                                    <th style="width: 14%;">
                                        <a href="#" id="titledskv5" style="margin-top: 5px;" class="down" lang="<%=msgright%>"  name="1" onclick="SortDTDB( this.className, this.name, this.lang)">
                                            <div style="float:left"><%=phonenumber%></div>
                                            <div style=" margin-right: 15px;" id="sortkv5" class="down1"></div>
                                        </a>
                                    </th>
                                    <th style="">
                                        <a href="#" id="titledskv6" class="down" lang="<%=msgright%>"  name="1" onclick="SortSoKhachDB( this.className, this.name, this.lang)">
                                            <div><%=numberofcustomer%></div>
                                            <div >
                                                <div id="sortkv6" class="down2"></div>
                                                <div id="sortkv6" class="up2" style="display:none;"></div>
                                            </div>
                                        </a>
                                    </th>
                                    <th></th>
                                </tr>
                                <tr id="searchDB">
                                    <td><img onclick="SearchDB(this.alt, this.lang, this.id)" id="<%=msgdate%>" style=" margin-top: 10px; margin-bottom: -20px;" class="searchKV" alt="1" lang="<%=msgright%>" src="images/search1.png"></td>
                                    <td>
                                        <div style=" width: 35px; float: left;"><%=from%></div>
                                        <input type="textbox" maxlength="10"  class="text tungay" style=" width: 80px; margin-right: 5px; margin-bottom: 5px;" id="datepicker2">
                                        <input type="textbox" class="text tugio" style=" width: 30px;  margin-right: 2px;  margin-bottom: 5px;" maxlength="2" onkeypress="return keypress(event)" value="0"><%=hours%>
                                        <br />
                                        <div style=" width: 35px; float: left;"><%=to%></div>
                                        <input type="textbox" maxlength="10" class="text denngay" style=" width: 80px; margin-right: 5px; margin-bottom: 5px; " id="datepicker3">
                                        <input type="textbox" class="text dengio" style=" width: 30px;  margin-right: 2px; margin-bottom: 5px;" maxlength="2" onkeypress="return keypress(event)" value="0"><%=hours%>
                                    </td>
                                    <td>
                                        <input type="textbox" style=" width: 100px;"  class="tenkv text">
                                    </td>
                                    <td>
                                        <input type="textbox" style=" width: 55px;"  class="tenban text" onkeypress="return keypress(event)">
                                    </td>
                                    <td>
                                        <input type="textbox" style=" width: 100px;"  class="kh text">
                                    </td>
                                    <td><input type="textbox" style=" width: 85px;"  class="sodt text" onkeypress="return keypress(event)"></td>
                                    <td>
                                        <input type="textbox" style=" width: 85px;"  class="sokhach text" onkeypress="return keypress(event)">
                                    </td>
                                    <td></td>
                                </tr>
                            </thead>
                            <tbody>
                                <%
                                            for (int i = (item - 1) * 4; i < (item - 1) * 4 + 4 && i < vsize; i++) {
                                                Beans.DatBan db = (Beans.DatBan) vDSDB.elementAt(i);
                                                total = total + 1;
                                %>
                                <tr>
                                    <td class="STT"><input type="checkbox" value="<%= db.getMaDB()%>" class="optionDB" name="optionDB"></td>
                                    <td ><%= db.getNgay()%>  -  <%= db.getGio()%>   <%=hours%></td>
                                    <td ><%=DatBan_Model.LayTenKV(db.getMaBan(), langid)%></td>
                                    <td style=" padding-left: 15px;"><%=DatBan_Model.LayTenBan(db.getMaBan())%></td>
                                    <td><%=db.getKhachHang()%></td>
                                    <td><%=db.getSoDT()%></td>
                                    <td style=" padding-left: 15px;"><%=db.getSoKhach()%></td>
                                    <td><a href="#" name="<%=msgright%>" id="<%=db.getMaDB()%>" lang="<%=db.getMaBan()%>" onclick="DetailDB(this.name, this.id, this.lang)"><img style="width: 17px; margin-top: 2px;" alt="" src="images/edit.png"></a></td>
                                </tr>
                                <%  }%>
                            <input type="hidden" name="total" value="<%=total%>">
                            </tbody>
                        </table>
                        <div style="float:left;">
                            <input type="button" style="margin-left: 0; margin-top: 5px; margin-bottom: 5px;" class="button" value ="<%=delete%>" lang="<%=msgright%>" id="1" onclick="DeleteDB( this.id, this.lang)">
                        </div>
                        <div class="pagination" style=" margin-top: 20px;">
                            <%
                                        int trang = 1;
                                        if (item > 1) {
                                            trang = item - 1;
                                        }
                            %>
                            <%
                            if (vsize > 4) {%>
                            <a href="#" class="prev"  name="<%= trang%>" lang="<%=msgright%>" onclick="Reservation( this.name, this.lang)">«</a>
                            <%      for (int c = 1; c <= numpage; c++) {
                                                        if (c != item) {
                            %>              <a href="#"  name="<%= c%>" lang="<%=msgright%>" onclick="Reservation( this.name, this.lang)" ><%= c%></a>
                            <%          } else {%><a class="current"> <%= c%></a> <% }
                                                    }
                            %>
                            <%      if (item + 1 <= numpage) {
                                                        trang = item + 1;
                                                    } else {
                                                        trang = item;
                                                    }
                            %>
                            <a href="#" class="next"  name="<%= trang%>" lang="<%=msgright%>" onclick="Reservation( this.name, this.lang)">»</a>
                            <%  }
                            %>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>


